<!-- 地图配置 -->
<template>
  <div style="margin-top:16px">
    <el-form-item label="开启轮播">
      <el-switch v-model="myConfig.banner" class="float_right"></el-switch>
    </el-form-item>
    <template v-if="myConfig.banner">
      <el-form-item label="轮播时间">
        <el-input v-model="myConfig.bannerTime"></el-input>
      </el-form-item>
    </template>
    <template v-if="myConfig.type===0">
      <el-form-item label="地图选择">
        <l-select :options="mapOption"
                     v-model="myConfig.mapData"
                     placeholder="请选择地图"></l-select>
      </el-form-item>
      <el-form-item label="地图比例" class="form_item_margin">
        <el-slider v-model="myConfig.zoom"
                     :max="5"
                     :step="0.1"
                     class="slider136"></el-slider>
      </el-form-item>
      <el-form-item label="字体">
        <span class="l_color_box r_margin_right8">
              <l-input-color
                v-model="myConfig.color"
                :notInput="true"
              ></l-input-color>
            </span>
            <el-input
              v-model="myConfig.color"
              class="r_96width r_margin_right8"
            >
            </el-input>
            <el-input
              v-model="myConfig.fontSize"
              class="r_56width"
              oninput="value=value.replace(/[^\d]/g,'')"
            >
              <span slot="suffix" style="line-height: 32px">px</span>
            </el-input>
      </el-form-item>
      <el-form-item label="字体高亮">
        <l-input-color v-model="myConfig.empColor"></l-input-color>
      </el-form-item>
      <el-form-item label="区域颜色">
        <l-input-color v-model="myConfig.areaColor"></l-input-color>
      </el-form-item>
      <el-form-item label="区域高亮">
        <l-input-color v-model="myConfig.empAreaColor"></l-input-color>
      </el-form-item>
    </template>
    <el-form-item label="边框">
         <span class="l_color_box r_margin_right8">
              <l-input-color
                v-model="myConfig.borderColor"
                :notInput="true"
              ></l-input-color>
            </span>
            <el-input
              v-model="myConfig.borderColor"
              class="r_96width r_margin_right8"
            >
            </el-input>
            <el-input
              v-model="myConfig.borderWidth"
              class="r_56width"
              oninput="value=value.replace(/[^\d]/g,'')"
            >
              <span slot="suffix" style="line-height: 32px">px</span>
            </el-input>
      </el-form-item>
    <template v-if="myConfig.type===1">
      <el-form-item label="图片地址">
        <l-input v-model="myConfig.img"></l-input>
      </el-form-item>
      <el-form-item label="地图比例">
        <el-slider v-model="myConfig.scale"
                     :max="300"></el-slider>
      </el-form-item>
    </template>
  </div>
</template>

<script>
export default {
  props: {
    config: {
      type: Object,
      default: () => ({}),
    },
  },
  data() {
    return {
        mapOption: [],
    };
  },
  computed: {
    myConfig() {
      return this.config;
    },
  },
}
</script>

<style>
</style>